﻿<%@ Page Title="" Language="C#" MasterPageFile="~/proposal_print.master" AutoEventWireup="true" CodeFile="proposal_printpreview.aspx.cs" 
Inherits="management_proposal_printpreview" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<style media=print>
.print_btn {display: none;}
</style>

    <div class="provider_inner">
        <div class="print_top">
            <div class="print_btn">
                <a href="#" onclick="window.print();return false;">Print statement</a>
            </div>
            <h1 style="width:500px;"><asp:Label ID="lblFormTitle" runat="server" Text="Label" Visible="false"></asp:Label>Statement of Completed Applications</h1>
        </div>
        <div style="display: none;">
            <asp:Label ID="lblProviderCompanyInformation" runat="server" Text=""></asp:Label>
        </div>
        <div id="divProviderAddress" runat="server" visible="false">
            <div class="w100px left">Insurer</div><div class="left">: <asp:Label ID="lblInsurer" runat="server" Text=""></asp:Label></div><br />
            <div class="w100px left">Report Type</div><div class="left">: <asp:Label ID="lblReportType" runat="server" Text=""></asp:Label></div><br />
            <div class="w100px left">Statement Date</div><div class="left">: <asp:Label ID="lblStatementDate" runat="server" Text=""></asp:Label></div><br />
            <div class="w100px left">Record Cound</div><div class="left">: <asp:Label ID="lblTotalRecord" runat="server" Text=""></asp:Label></div>
        </div>
        <div id="divRecordDetails" runat="server" visible="false">
            <b>Statement Date</b> : <asp:Label ID="lblDate" runat="server" Text=""></asp:Label>&nbsp; | &nbsp;
            <b>Total Number of Cases</b> : <asp:Label ID="lblTotalCases" runat="server" Text=""></asp:Label>
            <div style="float: right; text-align: left">
                <b>Generated Date/Time</b> : <asp:Label ID="lblPrintDate" runat="server" Text=""></asp:Label>
            </div>
            <div style="display: none">
                <asp:TextBox ID="txtProvider" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtInsuranceType" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtAppType" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtReportType" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtReportDate1" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtReportDate2" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtCEID" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtAppStatus" runat="server" Text="1"></asp:TextBox>
                <asp:TextBox ID="txtUserTypeId" runat="server" Text="400"></asp:TextBox>
            </div>
        </div>
        <div>
            <%--<b>Total Cases</b> :<asp:Label ID="lblTotalCases" runat="server" Text=""></asp:Label>
            <div style="float: right; text-align: left">
                <b>Total Premium</b> :<asp:Label ID="lblTotalPremium" runat="server" Text=""></asp:Label>
            </div>--%>
        </div>
        <asp:GridView ID="grvProposalSummary" runat="server" AllowSorting="False" AutoGenerateColumns="False" 
            Cellspacing="3" CellPadding="3" Width="100%" CssClass="progridstyle"  GridLines="None" 
            EmptyDataText="There are no data records to display." 
            DataKeyNames="QuoteRefNo" DataSourceID="sqlDsProposal" 
            onrowdatabound="grvProposalSummary_RowDataBound"> 
            <Columns>
                <asp:BoundField DataField="SubmitedDate" DataFormatString="{0:dd/MMM/yyyy}" HeaderText="Submission Date" SortExpression="SubmitedDate" ItemStyle-Width="90px" />
                <asp:BoundField DataField="QuoteRefNo" HeaderText="Ref No." SortExpression="QuoteRefNo" />
                <asp:BoundField DataField="ProposerName" HeaderText="Proposer's Name" SortExpression="ProposerName" />
                <asp:BoundField DataField="InsuranceType" HeaderText="Insurance Type" SortExpression="InsuranceType" />
                <asp:BoundField DataField="CompanyName" HeaderText="Insurance Company" SortExpression="CompanyName" />
                <asp:BoundField DataField="Package" HeaderText="Plan Name" SortExpression="Package" />
                <asp:BoundField DataField="AnnualPremium" HeaderText="Premium (฿)" DataFormatString="฿{0:#,0.00}" SortExpression="AnnualPremium" ItemStyle-Width="100px" />
                <asp:TemplateField HeaderText="Status (Accept/Decline)" HeaderStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label ID="lblStatus" runat="server" Text=" " Width="100px"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle />
            <PagerStyle />
            <SelectedRowStyle CssClass="progridover" />
            <HeaderStyle CssClass="progridheader" />
            <EditRowStyle />
            <AlternatingRowStyle CssClass="progridodd" />
            <RowStyle CssClass="progrideven" />
        </asp:GridView>
        <asp:GridView ID="grvIndProposalSummary" runat="server" AllowSorting="False" AutoGenerateColumns="False" 
            Cellspacing="3" CellPadding="3" Width="100%" CssClass="progridstyle"  GridLines="None" 
            EmptyDataText="There are no data records to display." 
            DataKeyNames="QuoteRefNo" DataSourceID="sqlDsProposal" 
            onrowdatabound="grvIndProposalSummary_RowDataBound"> 
            <Columns>
                <asp:BoundField DataField="SubmitedDate" DataFormatString="{0:dd/MMM/yyyy}" HeaderText="Submission Date" SortExpression="SubmitedDate" ItemStyle-Width="90px" />
                <asp:BoundField DataField="QuoteRefNo" HeaderText="Ref No." SortExpression="QuoteRefNo" />
                <asp:BoundField DataField="ProposerName" HeaderText="Proposer's Name" SortExpression="ProposerName" />
                <asp:BoundField DataField="InsuranceType" HeaderText="Insurance Type" SortExpression="InsuranceType" />
                <asp:BoundField DataField="Package" HeaderText="Plan Name" SortExpression="Package" />
                <asp:BoundField DataField="AnnualPremium" HeaderText="Premium (฿)" DataFormatString="฿{0:#,0.00}" SortExpression="AnnualPremium" ItemStyle-Width="100px" />
                <asp:TemplateField HeaderText="Status (Accept/Decline)" HeaderStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label ID="lblStatus" runat="server" Text=" " Width="100px"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle />
            <PagerStyle />
            <SelectedRowStyle CssClass="progridover" />
            <HeaderStyle CssClass="progridheader" />
            <EditRowStyle />
            <AlternatingRowStyle CssClass="progridodd" />
            <RowStyle CssClass="progrideven" />
        </asp:GridView>
        <%--<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GGR_DB_ReportConnectionString %>"
            SelectCommand="sprocCXTHProposalSummaryReportSelectedList" SelectCommandType="StoredProcedure">--%>
        <asp:SqlDataSource ID="sqlDsProposal" runat="server" ConnectionString="<%$ ConnectionStrings:GGR_DBConnectionString %>"
            SelectCommand="sprocReportsNonGGApplicationSelectedList" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtProvider" Name="ProviderCompanyId"  PropertyName="Text" Type="Int64" />
                <asp:ControlParameter ControlID="txtInsuranceType" Name="InsuranceType"  PropertyName="Text" Type="Int64" />
                <asp:ControlParameter ControlID="txtAppType" Name="ApplicationType"  PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtReportType" Name="ReportType"  PropertyName="Text" Type="Int16" />
                <asp:ControlParameter ControlID="txtReportDate1" Name="ReportDate1"  PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtReportDate2" Name="ReportDate2"  PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtAppStatus" Name="AppStatus"  PropertyName="Text" Type="Int64" />
                <asp:ControlParameter ControlID="txtCEID" Name="CEID"  PropertyName="Text" Type="Int64" />
                <asp:ControlParameter ControlID="txtUserTypeId" Name="UserTypeId"  PropertyName="Text" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <div style="float: right; text-align: right; margin-right: 118px;">
            <asp:TextBox Visible="false" ID="txtHidTotalAmount" runat="server">0</asp:TextBox>
            <div><asp:Label ID="lblTotalAmount" Font-Bold="true" runat="server" Text="Total Amount :"></asp:Label></div>
        </div>
    </div>
    <br style="clear:both"/>
    <div style="text-align:left; font-size:11px; color:#000; margin:7px 0 3px 0;">
        <strong>Note : </strong>Any discrepancies must be notified within 7 days, otherwise, this statement is 
        considered conclusive evidence that the entries are true, correct and accurate. 
        An invoice will then be issued.
    </div>
    <hr style="border:1px solid #ccc;" />
    <div style="text-align:center; font-size:11px; color:#666;">
        <asp:Label ID="lblCompanyInformation" runat="server" Text=""></asp:Label>
    </div>
    <br />
</asp:Content>

